//
//  ZHBarItem.m
//  Doctor
//
//  Created by liuzhishan on 16/1/18.
//  Copyright © 2016年 shanshan. All rights reserved.
//

#import "ZHBarItem.h"

@implementation ZHBarItem

-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    
    if (self) {
        
        [self addMyTabBarView];
        
    }
    
    
    return self;
}

-(void)addMyTabBarView
{
    
    
    
    self.imageView = [[UIImageView alloc]init];
    [self addSubview:self.imageView];
    
    
    self.imageViewHI = [[UIImageView alloc]init];
    [self addSubview:self.imageViewHI];
    self.imageViewHI.alpha = 0;
    
    
    
    self.titleLable = [[UILabel alloc]init];
    self.titleLable.textAlignment = NSTextAlignmentCenter;
    self.titleLable.font = [UIFont systemFontOfSize:15*WIDPro - 2];
    [self addSubview:self.titleLable];
    
    
    
   
 
    
   [self.imageView mas_makeConstraints:^(MASConstraintMaker *make) {
       
       make.top.equalTo(@8);
       make.height.equalTo(@32);
       make.left.equalTo(@30);
       make.right.equalTo(@-30);
       
       
   }];
    
    
    [self.imageViewHI mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.top.and.height.and.left.and.right.equalTo(self.imageView);
        
        
    }];
    
    
    
    [self.titleLable mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.top.equalTo(self.imageView.mas_bottom).offset(@9);
        make.bottom.equalTo(@-7);
        
        make.left.equalTo(@20);
        make.right.equalTo(@-20);
        
        
        
    }];
    
    
    
}



@end
